<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jstl/core"
                template="/template.xhtml">

    <ui:define name="conteudo">
        <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
        </h:panelGroup>
            <h4>#{msg['adicionar_cliente']}</h4>
                <h:panelGrid columns="2">
                    <h:outputText value="#{msg['nome']}:"/>
                    <h:inputText id="nome" value="#{cliente.cliente.nome}" title="Nome" required="true" requiredMessage="The nome field is required." />
                    <h:outputText value="#{msg['rua']}:"/>
                    <h:inputText id="endRua" value="#{cliente.cliente.endRua}" title="EndRua" />
                    <h:outputText value="#{msg['bairro']}:"/>
                    <h:inputText id="endBairro" value="#{cliente.cliente.endBairro}" title="EndBairro" />
                    <h:outputText value="#{msg['cidade']}:"/>
                    <h:inputText id="endCidade" value="#{cliente.cliente.endCidade}" title="EndCidade" />
                    <h:outputText value="#{msg['cep']}:"/>
                    <h:inputText id="endCep" value="#{cliente.cliente.endCep}" title="EndCep" />
                    <h:outputText value="#{msg['uf']}:"/>
                    <h:inputText id="endUf" value="#{cliente.cliente.endUf}" title="EndUf" />
                    <h:outputText value="#{msg['email']}:"/>
                    <h:inputText id="email" value="#{cliente.cliente.email}" title="Email" />
                    <h:outputText value="#{msg['news']}:"/>
                    <h:inputText id="receberNews" value="#{cliente.cliente.receberNews}" title="ReceberNews" />
                    <h:outputText value="#{msg['pratos_preferidos']}:"/>
                    <h:selectManyListbox id="cardapioCollection" value="#{cliente.cliente.cardapioCollection}" title="CardapioCollection">
                        <c:forEach items="#{cardapio.listCardapio}" var="item">
                            <f:selectItem itemValue="#{item.id}" itemLabel="#{item.produto}"/>
                            <f:converter converterId ="converterCardapio" />
                        </c:forEach>
                    </h:selectManyListbox>
                    <h:commandButton action="#{cliente.edit}" value="#{msg['salvar']}"/>
                </h:panelGrid>

    </ui:define>
</ui:composition>
